package com.lancoo.ccas52.mapper;
import com.lancoo.ccas52.pojo.vo.TeachingClassCourseDto;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
import java.util.Set;

import com.lancoo.ccas52.entity.TeachingClassStudent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.ccas52.config.MybatisRedisCache;
import org.apache.ibatis.annotations.CacheNamespace;

/**
 * <p>
 * 必修课对应的学生 Mapper 接口
 * </p>
 *
 * @author quin.song
 * @since 2023-01-31
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface TeachingClassStudentMapper extends BaseMapper<TeachingClassStudent> {

    int addBatch(@Param("teachingClassStudentCollection") Collection<TeachingClassStudent> teachingClassStudentCollection);

    /**
     * 批量添加学生 自定义时间
     * @param teachingClassStudentCollection
     * @return
     */
    int addBatchSetTime(@Param("teachingClassStudentCollection") Collection<TeachingClassStudent> teachingClassStudentCollection);

    /**
     * 获取教学班学生人数
     * @param teachingClassIds
     * @return
     */
    List<TeachingClassCourseDto> getStudentNumber(@Param("teachingClassIds") List<Long> teachingClassIds);

    Set<Long> getStudentCountByTeachingClassId(@Param("teachingClassId") Long teachingClassId);

}
